Skip to content

ArduinoCore-API deployment#2879

Merged
fpistm merged 14 commits into
stm32duino:mainfrom
Aymane-ST:dev
May 26, 2026
Merged

ArduinoCore-API deployment#2879
fpistm merged 14 commits into
stm32duino:mainfrom
Aymane-ST:dev

Conversation

@Aymane-ST
Copy link
Copy Markdown
Contributor

@Aymane-ST Aymane-ST commented Dec 15, 2025

Summary

This PR integrates the official ArduinoCore-API
as a git submodule under cores/arduino/api/, aligning STM32duino with the
official Arduino ecosystem standard


Motivation

This integration:

  • Aligns STM32duino with official Arduino API contracts
  • Enables seamless use of modern Arduino libraries targeting ArduinoCore-API
  • Introduces type-safe enums (PinMode, PinStatus, pin_size_t) that
    eliminate invalid-value bugs
  • Keeps all STM32-specific extensions fully intact

Commits Summary

Commit Description
b288540 Add ArduinoCore-API as git submodule in cores/arduino/api
2e1f2f1 CI: script to sync and rework ArduinoCore-API submodule
5280b5c CI: patch to update README with STM32duino integration info
4c1ea78 CI: patch to implement weak _write() hook for Print
0f54255 CI: change variant_generic template to generate pin_size_t analogInputPin[]
38e21ae feat(core): switch to ArduinoCore-API foundation (enums and types)
aa6beed CI: update workflow to support submodule
d200d64 feat(serial): switch to ArduinoCore-API usage
8eb97a7 feat(wire): switch to ArduinoCore-API usage
8ab7061 feat(spi): switch to ArduinoCore-API usage
782c249 feat(timer): switch to ArduinoCore-API usage
c2e3e30 feat(servo): switch to ArduinoCore-API usage
64b0e10 feat(rgbled): switch to ArduinoCore-API usage

What Changed

Submodule

  • ArduinoCore-API is tracked as a git submodule at cores/arduino/api/
  • Pinned to a stable upstream commit; synced via CI script

Core Types & Enums

  • Switched from raw uint32_t to pin_size_t, PinMode, PinStatus
  • Backward-compatible: legacy #define HIGH/OUTPUT/... macros preserved

Peripheral Migration

Each peripheral now inherits from the official abstract interface:

  • Uart(old HardwareSerial) → arduino::HardwareSerial — all pure virtuals implemented,
    STM32 extensions (setRx, setTx, setHalfDuplex, flow control...) preserved
  • TwoWirearduino::HardwareI2C — STM32 pin remapping extensions preserved
  • SPIClassarduino::HardwareI2C — pin remapping (setMISO, setMOSI,
    setSCLK, setSSEL) preserved
  • Servo, Timer, RGBled — updated to use API types

CI / Tooling

  • Submodule-aware CI workflow
  • Sync script to rework submodule state cleanly

Related

@Aymane-ST Aymane-ST added this to the 3.0.0 milestone Dec 15, 2025
@Aymane-ST Aymane-ST requested a review from fpistm December 15, 2025 16:07
@Aymane-ST Aymane-ST self-assigned this Dec 15, 2025
@Aymane-ST Aymane-ST added enhancement New feature or request draft Proposed fix not ready to be merged labels Dec 15, 2025
@fpistm fpistm changed the title ArduinoCoreAPI ArduinoCore-API deployment Dec 16, 2025
@Aymane-ST Aymane-ST force-pushed the dev branch 12 times, most recently from 4ff100b to 0f4c50e Compare January 12, 2026 10:31
@Aymane-ST Aymane-ST force-pushed the dev branch 7 times, most recently from c6a1003 to b236970 Compare January 26, 2026 12:19
@Aymane-ST Aymane-ST force-pushed the dev branch 2 times, most recently from 34e25f4 to a62bdf2 Compare January 27, 2026 14:40
@fpistm fpistm marked this pull request as ready for review April 22, 2026 09:30
@fpistm fpistm added arduino compatibility and removed draft Proposed fix not ready to be merged labels Apr 22, 2026
Copy link
Copy Markdown
Member

@fpistm fpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @Aymane-ST .
Under test.

Aymane-ST and others added 14 commits May 21, 2026 13:56
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
…tPin[]

Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistm fpistm merged commit 687003c into stm32duino:main May 26, 2026
23 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in STM32 core based on ST HAL May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

feat: ArduinoCore-API deployment

2 participants